package org.hghog.jlinkdemo.util;

import java.util.Objects;

/**
 * @author : HGhog
 * @date : 2024-08-27 22:07
 * @version: 1.0
 */
public class OperatorInfo {

    private int begin;
    private int end;
    private String inPath;
    private String outPath;
    private boolean isToType;
    private String type;
    private boolean isToSplit;
    private String split;

    public OperatorInfo() {
    }

    public int getBegin() {
        return begin;
    }

    public void setBegin(int begin) {
        this.begin = begin;
    }

    public int getEnd() {
        return end;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    public String getInPath() {
        return inPath;
    }

    public void setInPath(String inPath) {
        this.inPath = inPath;
    }

    public String getOutPath() {
        return outPath;
    }

    public void setOutPath(String outPath) {
        this.outPath = outPath;
    }

    public boolean isToType() {
        return isToType;
    }

    public void setToType(boolean toType) {
        isToType = toType;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isToSplit() {
        return isToSplit;
    }

    public void setToSplit(boolean toSplit) {
        isToSplit = toSplit;
    }

    public String getSplit() {
        return split;
    }

    public void setSplit(String split) {
        this.split = split;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OperatorInfo that = (OperatorInfo) o;
        return begin == that.begin && end == that.end && isToType == that.isToType && isToSplit == that.isToSplit && Objects.equals(inPath, that.inPath) && Objects.equals(outPath, that.outPath) && Objects.equals(type, that.type) && Objects.equals(split, that.split);
    }

    @Override
    public int hashCode() {
        return Objects.hash(begin, end, inPath, outPath, isToType, type, isToSplit, split);
    }

    @Override
    public String toString() {
        return "OperatorInfo{" +
                "begin=" + begin +
                ", end=" + end +
                ", inPath='" + inPath + '\'' +
                ", outPath='" + outPath + '\'' +
                ", isToType=" + isToType +
                ", type='" + type + '\'' +
                ", isToSplit=" + isToSplit +
                ", split='" + split + '\'' +
                '}';
    }
}
